<%@ page import="org.nightstudio.common.util.page.image.ImageUtil" %>
<%@ page import="org.nightstudio.common.util.page.css.CssUtil" %>
<%@ page import="org.nightstudio.common.util.page.script.ScriptUtil" %>
<%@ page import="org.nightstudio.common.util.page.message.MessageUtil" %>
<%@ page import="org.nightstudio.common.util.constant.RequestConstant" %>
<%@ page import="org.nightstudio.common.util.session.SessionUtil" %>
<%@ page import="org.nightstudio.common.util.action.ActionUtil" %>
<%@ page import="org.nightstudio.common.face.action.spi.NightStudioAction" %>
<%@ page import="org.nightstudio.common.face.SessionErrorAction" %>
<%@taglib uri="/spring" prefix="spring"%>
<%@taglib uri="/spring-form" prefix="form"%>
<%@taglib uri="/c" prefix="c"%>
<%@taglib uri="/ns" prefix="ns"%>
<%
final HttpServletRequest myRequest = request;
class MyPageUtil {
	public String img = ImageUtil.getImagePath(myRequest);
	public String css = CssUtil.getCssPath(myRequest);
	public String js = ScriptUtil.getScriptPath(myRequest);
	public String img(String path) {
		return ImageUtil.getImagePath(myRequest, path);
	}
	public String css(String path) {
		return CssUtil.getCssPath(myRequest, path);
	}
	public String js(String path) {
		return ScriptUtil.getScriptPath(myRequest, path);
	}
	public String m(String key) {
		return MessageUtil.m(myRequest, key);
	}
	public String m(String key, Object[] args) {
		return MessageUtil.m(myRequest, key, args);
	}
	public String attr(String key) {
		return (myRequest.getAttribute(key) != null)? (String) myRequest.getAttribute(key) : "";
	}
	public String[] attrs(String key) {
		return (myRequest.getAttribute(key) != null) ? (String[]) myRequest.getAttribute(key) : null;
	}
	public String s(Object o) {
		return s(o, "&nbsp;");
	}
	public String s(Object o, String defaultValue) {
		return (o != null && !"".equals(o.toString()))? o.toString() : defaultValue;
	}
	public String action(Class<? extends NightStudioAction> clazz) {
		return ActionUtil.getActionPath(myRequest, clazz);
	}
	public void removeWarnings() {
		img("");
		css("");
		js("");
		m("session_error_content");
		m("session_error_content", null);
		s("");
		attr("key");
		attrs("key");
		action(SessionErrorAction.class);
	}
}
MyPageUtil p = new MyPageUtil();
p.removeWarnings();
%>
<%!
public static String getInnerImagePath(HttpServletRequest request) {
	return ImageUtil.getInnerImagePath(request);
}
public static String getInnerImagePath(HttpServletRequest request, String path) {
	return ImageUtil.getInnerImagePath(request, path);
}
public static String getInnerCssPath(HttpServletRequest request) {
	return CssUtil.getInnerCssPath(request);
}
public static String getInnerCssPath(HttpServletRequest request, String path) {
	return CssUtil.getInnerCssPath(request, path);
}
public static String getInnerScriptPath(HttpServletRequest request) {
	return ScriptUtil.getInnerScriptPath(request);
}
public static String getInnerScriptPath(HttpServletRequest request, String path) {
	return ScriptUtil.getInnerScriptPath(request, path);
}
%>